<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%
    String path = request.getContextPath();
%>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <title>我要投资</title>
    <meta name="keywords" content=""/>
    <meta name="description" content=""/>
    <link href="<%=path%>/css/common.css" rel="stylesheet"/>
    <link rel="stylesheet" href="<%=path%>/css/owl.carousel.css"/>
    <link href="<%=path%>/css/index.css" rel="stylesheet" type="text/css">
    <link type="text/css" rel="stylesheet" href="<%=path%>/css/index2.css"/>
    <link href="<%=path%>/css/detail.css" rel="stylesheet" type="text/css">
    <script type="text/javascript" src="<%=path%>/js/jquery.min.js"></script>
    <script type="text/javascript" src="<%=path%>/js/common.js"></script>

    <link href="<%=path%>/plugin/bootstrap/css/style.min.css?v=4.0.0" rel="stylesheet">
</head>
<body>
<!-- 网站头部-->
<%@include file="../common/header.jsp" %>
<!--列表-->
<div class="page-filter wrap">
    <div class="breadcrumbs"><a href="<%=path%>/">首页</a>&gt;<span class="cur">投资列表</span></div>

    <div class="filter-inner clearfix" style="margin-left: -22px">
        <div class="filter-item">
            <div class="sx_list">
                <div class="list_tz">
                    <div class="list_tzl">
                        <img src="<%=path%>/images/shape-4.png"/>
                        <p class="ptz">pp一贷</p>
                    </div>
                    <div class="list_tzc">
                        <div class="ll_l">
                            <p>投资期限</p>
                            <p class="changeblue">90天</p>
                        </div>
                        <div class="ll_l">
                            <p>预期收益</p>
                            <p class="changeblue">6%</p>
                        </div>
                        <div class="ll_l">
                            <p>起投金额</p>
                            <p class="changeblue">1000元</p>
                        </div>
                        <div class="ll_l" style=" padding-left:30px">
                            <p>进度</p>
                            <div style="color:#31acfb; margin-top:50px; width:180px">
                                <div class="jind_z">
                                    <div class="jind_f"></div>
                                </div>
                                <div style="float:left; margin-left:5px">60%</div>
                            </div>
                        </div>
                    </div>
                    <div class="list_tzr">
                        <a href="myjk.html">
                            <div class="ljtz_btn">立即投资</div>
                        </a>
                        <div class="ckxq">查看详情</div>
                    </div>
                </div>

            </div>
        </div>
        <div class="filter-item">
            <div class="sx_list">
                <div class="list_tz">
                    <div class="list_tzl">
                        <img src="<%=path%>/images/shape-4.png"/>
                        <p class="ptz">艾派贷</p>
                    </div>
                    <div class="list_tzc">
                        <div class="ll_l">
                            <p>投资期限</p>
                            <p class="changeblue">90天</p>
                        </div>
                        <div class="ll_l">
                            <p>预期收益</p>
                            <p class="changeblue">6%</p>
                        </div>
                        <div class="ll_l">
                            <p>起投金额</p>
                            <p class="changeblue">100元</p>
                        </div>
                        <div class="ll_l" style=" padding-left:30px">
                            <p>进度</p>
                            <div style="color:#31acfb; margin-top:50px; width:180px">
                                <div class="jind_z">
                                    <div class="jind_f"></div>
                                </div>
                                <div style="float:left; margin-left:5px">60%</div>
                            </div>
                        </div>
                    </div>
                    <div class="list_tzr">
                        <a href="myjk.html">
                            <div class="ljtz_btn">立即投资</div>
                        </a>
                        <div class="ckxq">查看详情</div>
                    </div>
                </div>

            </div>
        </div>
    </div>


    <div class="invest-list mrt30 clearfix" style=" width: 1216px;">
        <div class="hd">
            <h3>借款列表</h3>
        </div>
        <div class="bd">
            <div class="invest-table clearfix" style=" border-left-width: 28; margin-left: 118px;">
                <div class="title clearfix">
                    <ul>
                        <li class="col-150">项目名称</li>
                        <li class="col-150">贷款总额</li>
                        <li class="col-150">利率</li>
                        <li class="col-150">借款期限</li>
                        <li class="col-150">还款方式</li>
<%--                        <li class="col-120">借款进度</li>--%>
                        <li class="col-120-t">操作</li>
                    </ul>
                </div>
                <!------------投资列表-------------->
                <c:forEach items="${obj}" var="d">
                    <div class="item">
                        <ul>
                                <%--  <li class="col-150"><a style="color: red">${d.bzname}</a></li>--%>
                            <li class="col-150"><a href="<%=path%>/page/info/${d.baid}"
                                                   style="size: 3px;color: #00a0e9">${d.cpname}</a></li>
                            <li class="col-150">${d.money}</li>
                            <li class="col-150"><span class="f20 c-orange">${d.nprofit}% </span></li>
                            &nbsp;&nbsp;&nbsp;
                            <li class="col-150"><span class="f20 c-333">${d.term}</span>个月</li>
                            <li class="col-170">${d.way}</li>
<%--                            <li class="col-120">--%>
<%--                                <div class="circle">--%>
<%--                                    <div class="left progress-bar">--%>
<%--                                        <div class="progress-bgPic progress-bfb10">--%>
<%--                                            <div class="show-bar">${(d.mmoney/d.money)*100}%</div>--%>
<%--                                        </div>--%>
<%--                                    </div>--%>
<%--                                </div>--%>
<%--                            </li>--%>
                            <c:if test="${d.mmoney<d.money}">
                                <li class="col-120-2">
                                        <%--<a class="ui-btn btn-gray" href="<%=path%>/page/info/${d.baid}">我要贷款</a>--%>
                                    <a class="ui-btn btn-gray" href="#">我要借款</a>
                                </li>
                            </c:if>
                            <c:if test="${d.mmoney==d.money}">
                                <li class="col-120-2">
                                        <%-- <a class="ui-btn btn-gray" href="<%=path%>/page/info/${d.baid}">还款中</a>--%>
                                    <a class="ui-btn btn-gray" href="#">还款中</a>
                                </li>
                            </c:if>
                        </ul>
                    </div>
                </c:forEach>
            </div>

            <!------------投资列表-------------->
            <c:if test="${page.total==0}">
                <li>
                    <div align="center">没有找到匹配的记录</div>
                </li>
            </c:if>
            <c:if test="${page.total>0}">
                <div class="pagination clearfix mrt30">
                    <span class="page">
                        <a href="javascript:void(0);">页码${page.pageNo}/${page.pages} </a>
                        <a class="active" href="javascript:void(0);" onclick="page(1)">首页</a>
                         <c:choose>
                             <c:when test="${page.pageNo - 1 > 0}">
                                 <a href="javascript:void(0);" onclick="page('${page.pageNo - 1}')">上一页</a>
                             </c:when>
                             <c:when test="${page.pageNo - 1 <= 0}">
                                 <a href="javascript:void(0);" onclick="page(1)">上一页</a>
                             </c:when>
                         </c:choose>
                        <c:choose>
                            <c:when test="${page.pages==0}">
                                <a href="javascript:void(0);" onclick="page('${page.pageNo}')">下一页</a>
                            </c:when>
                            <c:when test="${page.pageNo + 1 < page.pages}">
                                <a href="javascript:void(0);" onclick="page('${page.pageNo + 1}')">下一页</a>
                            </c:when>
                            <c:when test="${page.pageNo + 1 >= page.pages}">
                                <a href="javascript:void(0);" onclick="page('${page.pages}')">下一页</a>
                            </c:when>
                        </c:choose>
                         <c:choose>
                             <c:when test="${page.pages==0}">
                                 <a href="javascript:void(0);" onclick="page('${page.pageNo}')">尾页</a>
                             </c:when>
                             <c:otherwise>
                                 <a href="javascript:void(0);" onclick="page('${page.pages}')">尾页</a>
                             </c:otherwise>
                         </c:choose>
                        <a href="javascript:void(0);">共${page.total}条</a>
                        </span>
                </div>
            </c:if>
        </div>
    </div>
</div>
<!-- 网站底部-->
<%@include file="../common/footer.jsp" %>
<jsp:include page="../common/bootstraptablejs.jsp"/>
<script>
    function page(str) {
        var term1 = $("#term1").val();
        var nprofit1 = $("#nprofit1").val();
        var bzname1 = $("#bzname1").val();
        if (str == ${page.pageNo} && str == 1) {
            layer.msg("当前已经是第一页了哦！", {icon: 2, time: 1000});
            return false;
        }
        if (str == ${page.pageNo} && str ==${page.pages}) {
            layer.msg("当前已经是最后一页了哦！", {icon: 2, time: 1000});
            return false;
        }
        if (term1 != null) {
            str = str + "&term=" + term1;
        } else if (nprofit1 != null) {
            str = str + "&nprofit=" + nprofit1;
        } else if (bzname1 != null) {
            str = str + "&bzname=" + bzname1;
        }
        window.location.href = "/page/list?pageNo=" + str;
    }

</script>
</body>
</html>